﻿using System;
using System.ComponentModel.DataAnnotations;

namespace lottery.entity
{
    public class User
    {
        public int Id { get; set; }

        public Status Status { get; set; }

        public int PublishCount { get; set; }
        public int LotteryCount { get; set; }

        [DataType(DataType.Date)]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}")]
        [Display(Name = "Create Date")]
        public DateTime CreateDate { get; set; }

        [DataType(DataType.DateTime)]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd hh:mm}")]
        [Display(Name = "LastLogin Date")]
        public DateTime? LastLoginDate { get; set; }

        [StringLength(255)]
        public string DisplayName { get; set; }

        [StringLength(255)]
        public string WechartId { get; set; } // wechat's openid
        [StringLength(255)]
        public string WechartSession { get; set; }
        [StringLength(255)]
        public string Session { get; set; }
        public DateTime expiresIn { get; set; }
    }
}
